<?php

db_do_query(db_query_insert(array('user_id', 'click_time', 'target_url', 'source_url', 'ipstring'), array(intval($_SESSION['user_id']), 'NOW(14)', db_sqlize($_GET['target_url']), db_sqlize($_GET['source_url']), db_sqlize($_SERVER["REMOTE_ADDR"]." - ".$_SERVER["HTTP_X_FORWARDED_FOR"])), "SPONS_CLICK"));

redirect($_GET['target_url']);

?>